package com.luoc.service.impl;

import com.luoc.entity.Product;
import com.luoc.service.BuilderService;

/**
 * @Author: luoc
 * @Date: 2019/9/16 14:31
 */
public class Director {

    private BuilderService builderService;

    public Director(BuilderService builderService) {
        this.builderService = builderService;
    }

    public Product getProduct(){
        builderService.buildPartA();
        builderService.buildPartB();
        builderService.buildPartC();
        return  builderService.getResult();
    }
}
